<!DOCTYPE html>
<html>
<head>
    <title>页面布局示例</title>
    <style>
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
        }

        .container {
            display: grid; /* 使用grid布局 */
            grid-template-areas:
                "header header header"
                "left center right"
                "footer footer footer";
            grid-template-rows: auto 1fr auto; /* 自动高度、自动剩余空间、自动高度 */
            grid-template-columns: 1fr 2fr 1fr; /* 自动剩余空间、自动剩余空间、自动剩余空间 */
            height: 100%;
        }

        .item {
            border: 1px solid black;
            padding: 10px;
        }

        .header {
            grid-area: header;
            background-color: lightblue;
        }

        .left {
            grid-area: left;
            background-color: lightyellow;
        }
        
        .center {
            grid-area: center;
            background-color: lightgray;
        }

        .right {
            grid-area: right;
            background-color: lightpink;
        }

        .footer {
            grid-area: footer;
            background-color: lightgreen;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="item header">头部</div>
        <div class="item left">左侧</div>
        <div class="item center">中间</div>
        <div class="item right">右侧</div>
        <div class="item footer">底部</div>
    </div>
</body>
</html>

